package com.hengxinguotong.hxgtwygsp.ui.member;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hengxinguotong.hxgtwygsp.R;
import com.hengxinguotong.hxgtwygsp.model.Member;

import java.util.List;

/**
 * Created by CS-Yong
 * 2019/8/9  9:59
 */
public class MemberAdapter extends BaseQuickAdapter<Member, BaseViewHolder> {
    public MemberAdapter(int layoutResId, @Nullable List<Member> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Member item) {
        helper.setImageResource(R.id.member_picture,item.getPortrait());
        helper.setText(R.id.member_name,item.getName());
        helper.setText(R.id.member_sex,item.getSex());
        helper.setText(R.id.member_age,String.valueOf(item.getAge()));
        helper.setText(R.id.member_education,item.getEducation());
        helper.setText(R.id.member_house_no_and_register,item.getHouseNo());
        helper.setText(R.id.member_company,item.getCompany());
        helper.setText(R.id.member_division,item.getDivition());
        helper.setText(R.id.member_contact,item.getContact());
    }
}
